
var api = require('../../utils/api.js');
var app = getApp();
Page({
    data: {
        tophe:0,
        lists:[]
    },
    currentPageNumber: 1,
        onLoad() {
        var file=api.FIlE;
        this.setData({
            bg:file
        })
       
    },
    onShow() {
        let jn = wx.getMenuButtonBoundingClientRect();

        console.log(jn);
        var tophe=jn.top+jn.height+15;
        this.setData({
            tophe:tophe+'px',
            over:jn.top
        })
     
        this.getallmessse();

    },
    back(){
        wx.navigateBack()
    },
    goadd(){
        wx.reLaunch({
          url: '/pages/message/add',
        })
    },

    getallmessse(){
        var that=this;

        api.post({
            url: 'message/getall',
            data: {},
            success: data => {

                that.setData({
                    lists:data.data
                })

            },
        });

    }


});
